import { WebsiteActionsEnum } from '../../../_/vue/store/website'
import axios from '../../../plugins/axios'
import { Message } from 'element-ui'
export default {
  [WebsiteActionsEnum.LIST] () {
    return axios.get('/website')
  },
  [WebsiteActionsEnum.SAVE] ({ commit }, payload) {
    return axios.post('/website', payload)
      .then(() => {
        Message.success('保存成功')
        return Promise.resolve()
      })
      .catch((err) => {
        return Promise.reject(err)
      })
  }
}
